<include file="Public:header" />
<script type="text/javascript"> 
$(function(){
    $('#addPart').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success:function(label){
            label.addClass('right').text('OK!');
        },
        rules : {
            adname : {
                required : true,
				rangelength : [3,10],
            },
            adpw : {
                required : true,
				rangelength : [5,10],
            },		
            adpw1 : {
                required : true,
				rangelength : [5,10],
				equalTo: "#adpw"
            },										
        },
        messages : {
            adname : {
                required : '帐号不能为空',
				rangelength : '长度介于3-10之间',
            },
			adpw : {
                required : '密码不能为空',
				rangelength : '长度介于5-10之间',
            },
			adpw1 : {
                required : '密码不能为空',
				rangelength : '长度介于5-10之间',
				equalTo: "两次输入密码不一致"
            },			
        }	
    });
});
</script>
<style>
body{font-size:12px;}
.sminput{width:30px; text-align:center;}
td a{ margin:0 5px;}
tr{ height:40px;}
.red{ color:#F00}
.fl{float:left;}
</style>
<div id="content">
	<div id="main">
    	<div class="pad20">
        	<if condition="$myself neq 1">
                <include file="default:navig" />   
                <div>
                    <p style="text-align:right;"><input onclick="selflo('{$lasturl}')" class="button" type="submit" value="返回上一级" /></p>
                </div>
            </if>
			<div id="tabs">            
                <ul>
               		 <li><a href="#tabs-1">{$tabs}</a></li>
                </ul>               
                
                <div id="tabs-1">
                <form id="addPart" method="post" action="__APP__/Do/{$act}/">
                    <input type="hidden" name="model" value="{$model}" />
                    <input type="hidden" name="act" value="{$act}" />
                    <input type="hidden" name="callback" value="{$callback}" />       
                    <input type="hidden" name="cid" value="{$res['cid']}" />                
                    <table border="0" cellpadding="0" cellspacing="0">
                        <tr>   
                            <td>自定义排序：</td>
                            <td style="padding:8px 0;">
                                <input id="sorts" name="sorts" type="text" class="input" value="{$res['sorts']}" placeholder="自定义排序"/>
                            </td>
                        </tr>
                        <tr>   
                            <td>菜单名称：</td>
                            <td style="padding:8px 0;">
                                <input id="cname" name="cname" type="text" class="input" value="{$res['cname']}" placeholder="菜单名称"/>
                            </td>
                        </tr>
                        <tr>   
                            <td>所属分类：</td>
                            <td style="padding:8px 0;">
								<select id="pid" name="pid" class="input">
                                    <option value="0">顶级分类</option>
                                    {$cate}
                               	</select>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2"><input class="button" type="submit" value="保存" /></td>
                        </tr>
                     </table>
                 </form>
                </div>                                 
			</div>  
        </div>
	</div>
</div>            
                
<include file="Public:footer" />